-- GENERATED SPELL FOR [Lord Robin Daris] --


function spell0_19876(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19876', 10343, 1)
end

function spell1_19876(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(29572,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19876', 5327, 1)
end

function spell2_19876(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_19876', 605, 1)
end

function spell3_19876(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(29573,pUnit)
pUnit:RegisterEvent('Sorts_19876', 2000, 1)
end

function Sorts_19876(pUnit, Event)
local choix_sorts_19876 = math.random(0, 3)
if choix_sorts_19876 == 0 then
pUnit:RegisterEvent('spell0_19876', 1, 1)
end
if choix_sorts_19876 == 1 then
pUnit:RegisterEvent('spell1_19876', 1, 1)
end
if choix_sorts_19876 == 2 then
pUnit:RegisterEvent('spell2_19876', 1, 1)
end
if choix_sorts_19876 == 3 then
pUnit:RegisterEvent('spell3_19876', 1, 1)
end
end

function mob19876_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19876', math.random(1500, 3000), 1)
end

function mob19876_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19876_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19876_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19876, 1, 'mob19876_Action')
RegisterUnitEvent(19876, 2, 'mob19876_Leave')
RegisterUnitEvent(19876, 3, 'mob19876_Kill')
RegisterUnitEvent(19876, 4, 'mob19876_Die')
